<template>
  <div id="app">
    <el-row type="flex" justify="center">
      <el-col :xs="32" :sm="30" :md="28" :lg="28" :xl="26">
        <router-view/>
      </el-col>
    </el-row>
  </div>
</template>

<script>
    export default {
        name: 'App',
        data() {
            return {
            }
        },
          watch:{
    $route(to,from){
      if(to.path!='/login'&& to.path !='/handleLogin'){
        let flag = sessionStorage.login
        //在不是登录页的任何页面都检测当前是否登录
        //如果没有登录的话就强制跳转会登录页面并弹出提示
        if(flag == undefined){
          this.$notify.error({
            title:'提示',
            message:'您还没有登录请重新登录'
          })
          this.$router.push('/login')
        }
        
      }
    }
  },
        methods: {
        }
    }
</script>

<style>
#app {
    /* width: 100%;
    height: 100%; */
    font-family: 'Avenir', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0px;
    padding: 0px;
  }
</style>
